package ac.zlf.maven.template.service.Impl;

import ac.zlf.maven.template.dao.UserMapper;
import ac.zlf.maven.template.entity.User;
import ac.zlf.maven.template.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2018/6/16.
 */
@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> findAll() {
        return userMapper.selectAll();
    }

    @Override
    public void add(User user) {
             userMapper.insertSelective(user);
    }
}
